<div class="container" id="thu_vien_anh">
	<div class="row">
		<div class="span7">
			<h1><%= t 'cac_anh_da_upload' %></h1>
			<p>
				<%= t 'xep_theo_ten_tu___den___', :index_dau => @index_dau_tien, :index_cuoi => @index_cuoi_cung %>
			</p>
		</div>
		<div class="span5">
			<ul class="pager">
				<% if @trang_truoc.present? %>
				<li class="previous">
					<a href="<%= url_for :s => params[:s],  :page => @trang_truoc %>">&larr; <%= t 'trang_truoc'%></a>
				</li>
				<% end %>
				<% if @trang_sau.present? %>
				<li class="next">
					<a href="<%= url_for :s => params[:s], :page => @trang_sau %>"><%= t'trang_sau' %> &rarr;</a>
				</li>
				<% end %>
			</ul>
		</div>
	</div>
	<div class="row">
		<div class="span7" id="tim_kiem_anh">
			<%= form_tag '', :class=>"form-search", :method=> "get" do %>
			<p>
				<%= text_field_tag :s, params[:email], :class=>"input-xlarge search-query", :placeholder => t('tim_theo_ten_anh') %>
				<%= submit_tag t('tim_kiem'), :class=>"btn btn-primary" %>
				<a class="btn" href="<%= url_for :action => "anh_upload" %>"><%= t('xem_tat_ca')%></a>
			</p>
			<% end %>
		</div>
		<div class="span5 text-right">
			<a class="btn btn-primary" href="<%= url_for :action=>'upload' %>" target="_blank"><%= t 'upload_anh_moi'%></a>
		</div>
	</div>
	<% i = 0 %>
	<% host = "#{request.protocol}#{request.host_with_port}/"%>
	<% while i < @so_anh_moi_trang %>

	<div class="row">
		<% for j in 0..3 %>
		<% if i+ j < @anhs.length %>
		<% file_anh = @anhs[i + j]%>
		<div class="span3 anh_xem_truoc">
			<div>
				<img src="<%= "#{host}#{file_anh[7, file_anh.length]}" %>" />
				<br />
				<span class="ten_file_anh"><%= File.basename(file_anh) %></span><br />
				<i><%=t 'url_cua_anh'%></i><input type="text" value="<%= "#{host}#{file_anh[7, file_anh.length]}" %>">
			</div>
		</div>
		<% end %>
		<% end %>
	</div>
	<% i += 4 %>
	<% end %>
</div>
